<form action="keyword.manage.php" id="form1" name="form1" method="post">
	<input type="hidden" name="action" id="action" />
    <table width="100%" class="from_table" border="0" cellpadding="0" cellspacing="1"  style="margin-left:20px;>	<tpl> section name=loop loop=$file_array </tpl>
		<tr bgcolor="#FFFFFF">
		
				<td width="680" height="36" align="left" valign="middle" >
					<input type="checkbox" name="id[]" value="<tpl> $smarty.section.loop.rownum-1 </tpl>" /><tpl> $file_array[loop][2] </tpl>
					<tpl> $langKeywordSeachType </tpl>：<tpl> if $file_array[loop][1] eq '0' </tpl><tpl> $langKeywordMerchandise </tpl><tpl> /if </tpl><tpl> if $file_array[loop][1] eq '1' </tpl>
					<tpl> $langKeywordShop </tpl>
		  <tpl> /if </tpl><tpl> $langKeywordDegree </tpl>：<tpl> $file_array[loop][0] </tpl>）</td>
			
				<tpl> if $smarty.section.loop.rownum%4 eq 0 </tpl>		
	  </tr><tpl> /if </tpl>
			<tpl> /section </tpl>
			
	
  </table>
  <div class="table-5-bottom">
  <div class="p-left">
  <span class="btn_left"><input style=" font:12px/1.2em '宋体'; margin-right:5px" name="selectall" type="button" id="selectall" value="<tpl> $langKeywordASelect </tpl>" class="btn_submit" /></span>
				<span class="btn_left"><input style=" font:12px/1.2em '宋体'; margin-right:5px" name="negative" type="button" id="negative" value="<tpl> $langKeywordConSelect </tpl>"  class="btn_submit"/></span>
				<span class="btn_left"><input type="button" value="<tpl> $langCdele </tpl>" name="delbutton" id="delbutton"  class="btn_submit"/></span>
				<span class="btn_left"><input type="button" value="<tpl> $langCsave </tpl>" name="savebutton" id="savebutton"  class="btn_submit"/></span>
				<span class="btn_left"><input type="button" value="<tpl> $langKeywordReturn </tpl>" onclick="ShowDiv='result_content';getPageContent('keyword.manage.php?action=finish');"  class="btn_submit"/></span>

				<input type="hidden" name="file_name" id="file_name" value="<tpl> $file_name </tpl>" />	
  </div>
  </div>
</form>
<script>
$(document).ready(function() {

	$('#negative').click(
		function(){
			$('#form1 input[@type=checkbox]').each(function(){
				$(this).attr('checked',!$(this).attr('checked'))
			})
		}
		);
	$('#selectall').click(
		function(){
			$('#form1 input[@type=checkbox]').each(function(){
				$(this).attr('checked',true)
			})
		}
	);
	
	var options = {
		beforeSubmit:  function(){showLoading(showSaveText);},
		success:       function(msg){
							hideLoading();
							showMessage(msg.message,msg.type);
							if(msg.type == '1'){/* 文档还有其他内容，重新载入该文档 */ShowDiv	= 'result_content';
								getPageContent("keyword.manage.php?action=finish_info&url="+$('#file_name').val());
							}
							if(msg.type == '2'){/* 文档没有内容 */ShowDiv	= 'result_content';
								getPageContent("keyword.manage.php?action=finish");
							}
						},
		type:      'post',
		dataType:  'json'
	};
	
	//删除
	$("#delbutton").click(function(){
		$("#action").val('finish_del');
		$('#form1').ajaxSubmit(options);
	});
	//保存
	$("#savebutton").click(function(){
		$("#action").val('finish_save');
		$('#form1').ajaxSubmit(options);
	});
	
});


function ajax_finish(str){
	ShowDiv	= 'result_content';
	getPageContent("keyword.manage.php?action=finish_info&url="+str);
}

</script>